{% extends 'group_base.html' %}

{% block theme %}
我的群组
{% endblock %}

{% block headline %}
<div id=uiHeaderSection class="zbar clearfix">
<span class="now">
	<span>最新话题</span>
</span>
<a href="/group/my_topics/">我发起的话题</a>
<a href="/group/my_replied_topics/">我回应的话题</a>
<a href="/group/posts/">帖子</a>
<a href="/group/questions/">问题</a>
</div>
{% endblock %}

{% block tbody %}
<tr>
	<td> </td>
	<td>话题</td>
	<td>群组</td>
	<td>作者</td>
	<td align="right" nowrap="nowrap">回应</td>
	<td align="right">发布时间</td>
</tr>
{% for topic in topics %}										
<tr class="pl">
	{% if topic.1 %}
	<td>
		<img src="/image/none.png" />
		<img src="/image/question.png" />
	</td>
	<td class="td_title">
		<a href="/qa/questions/{{topic.0.id}}/" title={{ topic.0.title }} target="_blank"> {{ topic.0.title|slice:":30"}}... </a>
	</td>
	<td class="td_group">
		<a href="/group/gr/{{ topic.1.id }}/"> {{ topic.1 }} </a>
	</td>
	<td> {{ topic.0.questioner.name }} </td>
	<td align="right"> {{ topic.0.answered_count }} </td>
	<td align="right"> {{ topic.0.question_datetime|date:"Y-m-j f" }} </td>
	{% else %}
	<td>
		{% if topic.stick %}
			<img src="/image/up.png" />
		{% else %}
			<img src="/image/none.png" />
		{% endif %}
		
		{% if topic.elite %}
			<img src="/image/star.png" />
		{% else %}
			<img src="/image/post.png" />
		{% endif %}
	</td>
	<td class="td_title">
		<a href="/group/post/{{topic.id}}/" title={{ topic.title }}> {{ topic.title }} </a>
	</td>
	<td class="td_group">
		<a href="/group/gr/{{ topic.group.id }}/"> {{ topic.group }} </a>
	</td>
	<td class="td_name"> {{ topic.poster.name }} </td>
	<td align="right"> {{ topic.replied_count }} </td>
	<td align="right"> {{ topic.post_datetime|date:"Y-m-j f" }} </td>
	{% endif %}
</tr>
{% endfor %}
{% endblock %}

{% block aside %}
<div>
<p class="pl2">
	&gt;
	<a href="/group/recommend_groups/">群组推荐</a>
</p> 
</div>

<!--
<h2>群组搜索 ...... </h2>
<div class="indent">
	<div class="infobox">
		<div class="ex1">
		<span></span>
		</div>
		<div class="bd">
			<form id="group_search" name="group_search" action="/search" method="get">
				<div class="ttc">
					<input name="q" class="j a_search_text input_search greyinput" type="text" size="36" maxlength="36" value>
				</div>
				<div class="tc">
					<input class="butt" name="group_submit" type="submit" value="搜索群组">	
					<input name="topic_submit" class="butt" type="submit" value="搜索发言">
				</div>
			</form>
		</div>
		<div class="ex2">
			<span></span>
		</div>
	</div>
</div>
-->

<div>
<p class="pl2">
&gt;
<a href="/group/new_group/">申请创建群组</a>
</p>
<br>
</div>

<h2>我参加的群组  ...... (<a href="/group/my_groups/" style="font-size:12px;">查看详细</a>)</h2>
<div class="indent obssin">
	{% for group in groups %}
	<dl class="ob">
		<dt>
			<a href="/group/gr/{{ group.id }}">
				<img src="{{ group.logo }}" class="m_sub_img" alt={{ group.name }} style="width:70%;">
			</a>
		</dt>
		<dd>
			<a href="/group/gr/{{ group.id }}/" >{{group.name}}</a>
		
			<span>({{ group.members.all|length }})</span>
		</dd>
	</dl>
	{% endfor %}
	<!--
	<dl class="ob">
		<dt><div><a href="/group/my_groups/">&gt;查看所有</a></div></dt>
		<dd></dd>
	</dl>
	-->
</div>
<div class="clear"></div>

{% endblock %}



